import BaseController from '../../core/controllers/Base.controller';

@Inject('$log', '$scope', '$rootScope', '$state', 'globalService', 'personalWorkbenchService', 'ngDialog', 'ngDialogService')
class workbenchProcessDoingController extends BaseController {
  constructor() {
    super(personalWorkbenchService, 'queryDoing');

    this.paginationService = this.personalWorkbenchService;
    this.$setQueryCallback((res) => {
      this.doingListData = res.rows;
    });
    this.$paginationQuery();
    $scope.$on('childNotice', (e, m) => {
      if (m.type === '2') {
        this.mapParams.createEndTime = m.params.createEndTime.$viewValue;
        this.mapParams.createStartTime = m.params.createStartTime.$viewValue;
        this.$paginationQuery();
      }
    });
  }
}

export default workbenchProcessDoingController;
